mChanged As Long '0 if the stream information has not changed since the last decoded frame, or non zero if it has
mLevel As Long 'MPEG syntax level (1 for MPEG1, 2 for MPEG2, 0 for MPEG2.5)
mLayer As Long 'MPEG layer (1, 2 or 3)
mBitrate As Long 'MPEG bitrate (in bits per second)
mFrequency As Long 'MPEG sampling frequency (in Hz)
mMode As Long 'MPEG mode (0 for stereo, 1 for joint-stereo, 2 for dual-channel, 3 for mono)
mDuration As Long 'estimated stream duration (in milliseconds)
End Type
Public Type XA_TimeCode
mH As Long 'hours
mM As Long 'minutes
mS As Long 'seconds
mF As Long 'fractures in 100th of second
End Type
Public Type XA_StatusInfo
mFrame As Long 'current frame number
mPosition As Single 'Value between 0.0 and 1.0 giving the relative position in the stream
mInfo As XA_InputStreamInfo 'input stream structure
mTimecode As XA_TimeCode 'time code structure
End Type
Public Type XA_AbsoluteTime
mSeconds As Long
mMicroseconds As Long
End Type
Public Type XA_EnvironmentInfo
mName As String
mInteger As Long
mString As String
End Type
Public Type XA_TimecodeInfo
mH As Byte
mM As Byte
mS As Byte
mF As Byte
End Type
Public Type XA_NackInfo
mCommand As Byte
mCode As Integer
End Type
Public Type XA_VolumeInfo
mMasterLevel As Byte
mPCMLevel As Byte
mBalance As Byte
End Type
Public Type XA_PositionInfo
mOffset As Long
mRange As Long
End Type
Public Type XA_ModuleInfo
nID As Byte
mNBDevices As Byte
mName As String
mDescription As String
End Type
Public Type XA_FilterInfo
nID As Integer
mName As String
End Type
Public Type XA_DeviceInfo
mModuleID As Byte
mIndex As Byte
mFlags As Byte
mName As String
mDescription As String
End Type
Public Type XA_StreamParameters
mFrequency As Long
mBitrate As Integer
mNBChannels As Byte
End Type
Public Type XA_ModuleMessage
mType As Integer
mSize As Long
mData As Long
End Type
Public Type XA_TagEvent
mWhen As XA_AbsoluteTime
mTag As Long
End Type
Public Type XA_AudioEvent
mWhen As XA_AbsoluteTime
mSamplingFrequency As Long
mNBChannels As Integer
mNBSamples As Integer
mSamples As String
End Type
Public Type XA_TimecodeEvent
mWhen As XA_AbsoluteTime
mTimecode As XA_TimecodeInfo
End Type
Public Type XA_PositionEvent
mWhen As XA_AbsoluteTime
mPosition As XA_PositionInfo
End Type
Public Type XA_ProgressInfo
mSource As Byte
mCode As Byte
mValue As Integer
mMessage As String
End Type
Public Type XA_DebugInfo
mSource As Byte
mLevel As Byte
mMessage As String
End Type
Public Type XA_ErrorInfo
mSource As Byte
mCode As Integer
mMessage As String
End Type
Public Type XA_PrivateData
mSource As Byte
mType As Integer
mData As Long
mSize As Long
End Type
Public Type XA_EqualizerInfo
eleft(XA_DECODER_EQUALIZER_NB_BANDS) As Byte
eright(XA_DECODER_EQUALIZER_NB_BANDS) As Byte
End Type
Public Enum XA_PropertyType
XA_PROPERTY_TYPE_STRING
XA_PROPERTY_TYPE_INTEGER
End Enum
Public Type XA_PropertyValue
mInteger As Long
mString As String
End Type
Public Type XA_Property
mName As String
mType As XA_PropertyType
mValue As XA_PropertyValue
End Type
Public Type XA_PropertyList
mNBProperties As Long
mProperties As XA_Property
End Type
'INPUT/OUTPUT STATE
Public Enum XA_InputOutputState
XA_STATE_OPEN = 0
XA_STATE_CLOSED = 1
End Enum
'PLAYER STATE
Public Enum XA_PlayerState
XA_PLAYER_STATE_STOPPED = 0
XA_PLAYER_STATE_PLAYING = 1
XA_PLAYER_STATE_PAUSED = 2
XA_PLAYER_STATE_EOS = 3
End Enum
Public Type XA_Message
mCode As XA_MessageCode
'data structure follows
mBuffer As String
mName As String
mString As String
mMimeType As String
mModuleID As Integer
mMode As Long
mChannels As Byte
mQuality As Byte
mDuration As Long
mRange As Long
mGranularity As Long
mCaps As Long
mPorts As Byte
mAck As Byte
mTag As Long
mDebugLevel As Byte
mNotificationMask As Long
mRate As Byte
mNack As XA_NackInfo
mVolume As XA_VolumeInfo
mPosition As XA_PositionInfo
mEqualizer As XA_EqualizerInfo
mModuleinfo As XA_ModuleInfo
mFilterInfo As XA_FilterInfo
mDeviceInfo As XA_DeviceInfo
mStreamParameters As XA_StreamParameters
mEnvironmentInfo As XA_EnvironmentInfo
mTimecode As XA_TimecodeInfo
mModuleMessage As XA_ModuleMessage
mTagEvent As XA_TagEvent
mAudioEvent As XA_AudioEvent
mTimecodeEvent As XA_TimecodeEvent
mPositionEvent As XA_PositionEvent
mProperties As XA_PropertyList
mWhen As XA_AbsoluteTime
mProgress As XA_ProgressInfo
mDebug As XA_DebugInfo
mError As XA_ErrorInfo
mPrivateData As XA_PrivateData
mInputState As XA_InputOutputState
mOutputState As XA_InputOutputState
mPlayerState As XA_PlayerState
mInputStreamInfo As XA_InputStreamInfo
'end of data structure
End Type
'open new player if par=0 then msges will be sent to player, otherwise to specified window handle hWnd
Public Declare Function player_new Lib "xaudio.dll" (hPlayer As Long, par As Long) As Long
'delete specified player
Public Declare Function player_delete Lib "xaudio.dll" (ByVal hPlayer As Long) As Long
Public Declare Function player_set_priority Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal par As Long) As Long
Public Declare Function player_get_priority Lib "xaudio.dll" (ByVal hPlayer As Long) As Long
Public Declare Function control_message_send_S Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, ByVal msg_str As String) As Long
Public Declare Function control_message_send_N Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long) As Long
Public Declare Function control_message_send_I Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, ByVal dat As Long) As Long
'Public Declare Function control_message_get Lib "xaudio.dll" (hPlayer As Long, status As XA_Message) As Long
'Public Declare Function control_message_wait Lib "xaudio.dll" (ByVal hPlayer As Long, status As XA_Message, ByVal TimeOut As Long) As Long
'Public Declare Function control_message_sprint Lib "xaudio.dll" (strBuff As String, status As XA_Message) As Long
'Public Declare Function xaudio_get_version Lib "xaudio.dll" (ByVal cc As Long) As Long
Public Declare Function control_message_send_IPI Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, ByVal dat1 As Long, ptr As Any, ByVal dat2 As Long) As Long
Public Declare Function control_message_send_II Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, ByVal dat1 As Long, ByVal dat2 As Long) As Long
Public Declare Function control_message_send_P Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, dat As Any) As Long
Public Declare Function control_message_send_III Lib "xaudio.dll" (ByVal hPlayer As Long, ByVal msg_code As Long, ByVal dat1 As Long, ByVal dat2 As Long, ByVal dat3 As Long) As Long
'FEEDBACK HANDLER STATE
Public Const XA_FEEDBACK_HANDLER_STATE_STARTED = 0
Public Const XA_FEEDBACK_HANDLER_STATE_STOPPED = 1
'ERROR CODES
Public Const XA_SUCCESS = 0
Public Const XA_FAILURE = -1
'Priorities
Public Const XA_CONTROL_PRIORITY_LOWEST = 0
Public Const XA_CONTROL_PRIORITY_LOW = 1
Public Const XA_CONTROL_PRIORITY_NORMAL = 2
Public Const XA_CONTROL_PRIORITY_HIGH = 3
Public Const XA_CONTROL_PRIORITY_HIGHEST = 4
'general error codes
Public Const XA_ERROR_BASE_GENERAL = -100
Public Const XA_ERROR_OUT_OF_MEMORY = XA_ERROR_BASE_GENERAL - 0
Public Const XA_ERROR_OUT_OF_RESOURCES = XA_ERROR_BASE_GENERAL - 1
Public Const XA_ERROR_INVALID_PARAMETERS = XA_ERROR_BASE_GENERAL - 2
Public Const XA_ERROR_INTERNAL = XA_ERROR_BASE_GENERAL - 3
Public Const XA_ERROR_TIMEOUT = XA_ERROR_BASE_GENERAL - 4
Public Const XA_ERROR_VERSION_EXPIRED = XA_ERROR_BASE_GENERAL - 5
Public Const XA_ERROR_VERSION_MISMATCH = XA_ERROR_BASE_GENERAL - 6
'network error codes
Public Const XA_ERROR_BASE_NETWORK = -200
Public Const XA_ERROR_CONNECT_TIMEOUT = XA_ERROR_BASE_NETWORK - 0
Public Const XA_ERROR_CONNECT_FAILED = XA_ERROR_BASE_NETWORK - 1
Public Const XA_ERROR_CONNECTION_REFUSED = XA_ERROR_BASE_NETWORK - 2
Public Const XA_ERROR_ACCEPT_FAILED = XA_ERROR_BASE_NETWORK - 3
Public Const XA_ERROR_LISTEN_FAILED = XA_ERROR_BASE_NETWORK - 4
Public Const XA_ERROR_SOCKET_FAILED = XA_ERROR_BASE_NETWORK - 5
Public Const XA_ERROR_SOCKET_CLOSED = XA_ERROR_BASE_NETWORK - 6
Public Const XA_ERROR_BIND_FAILED = XA_ERROR_BASE_NETWORK - 7
Public Const XA_ERROR_HOST_UNKNOWN = XA_ERROR_BASE_NETWORK - 8
Public Const XA_ERROR_HTTP_INVALID_REPLY = XA_ERROR_BASE_NETWORK - 9
Public Const XA_ERROR_HTTP_ERROR_REPLY = XA_ERROR_BASE_NETWORK - 10
Public Const XA_ERROR_HTTP_FAILURE = XA_ERROR_BASE_NETWORK - 11
Public Const XA_ERROR_FTP_INVALID_REPLY = XA_ERROR_BASE_NETWORK - 12
Public Const XA_ERROR_FTP_ERROR_REPLY = XA_ERROR_BASE_NETWORK - 13
Public Const XA_ERROR_FTP_FAILURE = XA_ERROR_BASE_NETWORK - 14
'control error codes
Public Const XA_ERROR_BASE_CONTROL = -300
Public Const XA_ERROR_PIPE_FAILED = XA_ERROR_BASE_CONTROL - 0
Public Const XA_ERROR_FORK_FAILED = XA_ERROR_BASE_CONTROL - 1
Public Const XA_ERROR_SELECT_FAILED = XA_ERROR_BASE_CONTROL - 2
Public Const XA_ERROR_PIPE_CLOSED = XA_ERROR_BASE_CONTROL - 3
Public Const XA_ERROR_PIPE_READ_FAILED = XA_ERROR_BASE_CONTROL - 4
Public Const XA_ERROR_PIPE_WRITamplingFrequeneT_STATE_CLOSED = 1
End Enum
FL - 3
aio7 XA_ERDIED 1
PubliISTErR_BASE_GENERALoeDeclare Function player_new Lib "ng